using System;
using CookComputing.XmlRpc;
using Whitemice.MOGI;

namespace Whitemice.MOGI.ZOGI
{
	public class CompanyValue : IMOGIObject
	{		
		Payload	payload;
		
		public CompanyValue(Payload payload)
		{
			this.payload = payload;
		}
		
		public string Name
		{
			get { return "Fragment/CompanyValue/" + ObjectId.ToString(); }
		}
		
		public string UID
		{
			get { return payload.GetStringForKey("uid"); }
			set { payload.SetValueForKey("uid", value); }
		}
		
		public int ObjectId
		{
			get { return payload.GetIntForKey("objectId"); }
			set { payload.SetValueForKey("objectId", value); }
		}		
		
		public string Attribute
		{
			get { return payload.GetStringForKey("Attribute"); }
		}		
		
		public string Value
		{
			get { return payload.GetStringForKey("value"); }
			set { payload.SetValueForKey("value", value); }
		}
		
		public string Label
		{
			get { return payload.GetStringForKey("label"); }
		}		
		
		public int Type
		{
			get { return payload.GetIntForKey("type"); }
		}
		
		public int CompanyId
		{
			get { return payload.GetIntForKey("companyObjectId"); }
		}
	}
}